/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.exam;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * <p>Project: javaseapp - PrintWriterDemo
 * <p>Powered by webrx On 2021-08-12 15:35:32
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class PrintWriterDemo {
    public static void main(String[] args) {
        //PrintWriter out = new PrintWriter("java4.txt")
        try (PrintWriter out = new PrintWriter(new FileOutputStream("java4.txt"), true)) {
            out.print("hell world\r\n");
            out.print("中国人");
            out.printf("%n%1$tF %1$tT%n", System.currentTimeMillis());
            out.append("hello world");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
